Optimal. Leaf size=88 \[ -\frac{\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac{\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}-\frac{a \tan (c+d x)}{b^2 d}+\frac{\sec ^2(c+d x)}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.140972, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3104, 3767, 8, 3102, 3475, 3133} \[ -\frac{\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac{\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}-\frac{a \tan (c+d x)}{b^2 d}+\frac{\sec ^2(c+d x)}{2 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3104
Rule 3767
Rule 8
Rule 3102
Rule 3475
Rule 3133
Rubi steps
\begin{align*} \int \frac{\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx &=\frac{\sec ^2(c+d x)}{2 b d}-\frac{a \int \sec ^2(c+d x) \, dx}{b^2}+\frac{\left (a^2+b^2\right ) \int \frac{\sec (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^2}\\ &=\frac{\sec ^2(c+d x)}{2 b d}+\frac{\left (a^2+b^2\right ) \int \frac{b \cos (c+d x)-a \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^3}+\frac{\left (a^2+b^2\right ) \int \tan (c+d x) \, dx}{b^3}+\frac{a \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{b^2 d}\\ &=-\frac{\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac{\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}+\frac{\sec ^2(c+d x)}{2 b d}-\frac{a \tan (c+d x)}{b^2 d}\\ \end{align*}
Mathematica [A] time = 0.14103, size = 52, normalized size = 0.59 \[ \frac{\left (a^2+b^2\right ) \log (a+b \tan (c+d x))-a b \tan (c+d x)+\frac{1}{2} b^2 \tan ^2(c+d x)}{b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.16, size = 72, normalized size = 0.8 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{2\,db}}-{\frac{a\tan \left ( dx+c \right ) }{{b}^{2}d}}+{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{2}}{d{b}^{3}}}+{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{db}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.10488, size = 321, normalized size = 3.65 \begin{align*} -\frac{\frac{2 \,{\left (\frac{a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{b \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac{a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{b^{2} - \frac{2 \, b^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{b^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac{{\left (a^{2} + b^{2}\right )} \log \left (-a - \frac{2 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{b^{3}} + \frac{{\left (a^{2} + b^{2}\right )} \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{3}} + \frac{{\left (a^{2} + b^{2}\right )} \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{3}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.524793, size = 294, normalized size = 3.34 \begin{align*} \frac{{\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) -{\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b^{2}}{2 \, b^{3} d \cos \left (d x + c\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{3}{\left (c + d x \right )}}{a \cos{\left (c + d x \right )} + b \sin{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1557, size = 73, normalized size = 0.83 \begin{align*} \frac{\frac{b \tan \left (d x + c\right )^{2} - 2 \, a \tan \left (d x + c\right )}{b^{2}} + \frac{2 \,{\left (a^{2} + b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]